[IA64] fix vmx_vcpu_ptr_i(), vmx_vcpu_ptr_d()
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Sat, 3 Jun 2006 19:21:14 +0000 (13:21 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Sat, 3 Jun 2006 19:21:14 +0000 (13:21 -0600)
They must purge all tr registers which overlap. not only one.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
xen/arch/ia64/vmx/vmmu.c

index 4470e53efd2de75bb439a58b06dade247b3a24e5..31a52152f1be42fea7babbc2469c4f9518034b79 100644 (file)
@@ -456,8 +456,7 @@ IA64FAULT vmx_vcpu_ptr_d(VCPU *vcpu,UINT64 ifa,UINT64 ps)
     u64 va;
 
     va = PAGEALIGN(ifa, ps);
-    index = vtr_find_overlap(vcpu, va, ps, DSIDE_TLB);
-    if (index>=0) {
+    while ((index = vtr_find_overlap(vcpu, va, ps, DSIDE_TLB)) >= 0) {
         vcpu->arch.dtrs[index].pte.p=0;
     }
     thash_purge_entries(vcpu, va, ps);
@@ -470,8 +469,7 @@ IA64FAULT vmx_vcpu_ptr_i(VCPU *vcpu,UINT64 ifa,UINT64 ps)
     u64 va;
 
     va = PAGEALIGN(ifa, ps);
-    index = vtr_find_overlap(vcpu, va, ps, ISIDE_TLB);
-    if (index>=0) {
+    while ((index = vtr_find_overlap(vcpu, va, ps, ISIDE_TLB)) >= 0) {
         vcpu->arch.itrs[index].pte.p=0;
     }
     thash_purge_entries(vcpu, va, ps);